

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<script type="text/javascript" src="helpman_topicinit.js"></script>

<title>Example Scripts [Enterprise Architect User Guide]</title>

<meta name="keywords" content="Enterprise Architect, Sparx Systems, UML, Shape Scripts,Shape Scripts Example Shape Scripts,Shape Scripts Double Line,Shape Scripts Cloud Path,Shape Scripts Basic Shapes,Shape Scripts Filled Arrow,Shape Scripts Single Condition,Shape Scripts Multiple Condition,Shape Scripts Subshape,Shape Scripts Editable Field,Shape Scripts Return Statement,Shape Scripts Connector">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />

<link type="text/css" href="default.css" rel="stylesheet" />
<style type="text/css">
  A, A:Visited
  {
    color: #00F;
  }

  A:Active, A:Hover
  {
    color: #F00;
  }

  OL
  {
    margin: 5px 0 5px 48px;
  }

  UL
  {
    margin-bottom: 3px;
    margin-top: 0;
  }

  #nsr
  {
    background-color: #D4DFFF;
  }

  #nsr A
  {
    text-decoration: none;
  }

  #mainbody
  {
    padding: 8px;
  }

  .p_BodyText
  {
    padding: 5px 0;
  }
</style>



<style type="text/css" media="screen">
  BODY
  {
    background-color: #FFFFFF;
  }

  #nsr
  {
    padding: 6px 6px 0 6px;
    border-bottom: none;
    vertical-align: top;
    z-index: 2;
    visibility: visible;
    left: 0;
    top: 0;
    position: absolute;
  }

  #mainbody
  {
    left: 0;
    top: 0;
    margin: 0;
    position: absolute;
    padding: 10px;
    overflow: auto;
    height: 100%;
    z-index: 1;
    background-repeat: no-repeat;
    background-position: bottom right;
    background-attachment: fixed;
  }
</style>

<style type="text/css" media="print">
  #nsr
  {
    visibility: none;
  }

  #mainbody
  {
    overflow: visible;
  }
</style>
<script type="text/javascript" language="JavaScript" src="nonscroll.js"></script>

</head>
<body scroll="no">

<div id="page">



        <div id="content">
          <div id="content-inner">
          



  
          <div id="nsr">
            <table border="0" cellspacing="0" cellpadding="4" width="100%">
              <tr valign="top">
                <td align="left">
  


                  <p class="p_Heading1"><span class="f_Heading1">Example Scripts</span></p>



  
                </td>
                <td align="right">
                  <a href="introduction.htm" onmouseover="document.images.main.src='button_main_h.gif'" onmouseout="document.images.main.src='button_main.gif'">
                    <img name="main" src="button_main.gif" border=0 alt="Return to Introduction">
                  </a>&nbsp;
    
                  <a href="miscellaneous.htm" onmouseover="document.images.prev.src='button_prev_h.gif'" onmouseout="document.images.prev.src='button_prev.gif'">
                    <img name=prev src="button_prev.gif" border=0 alt="Previous page" />
                  </a>&nbsp;
    
    
    
                  <a href="tagged_value_types.htm" onmouseover="document.images.next.src='button_next_h.gif'" onmouseout="document.images.next.src='button_next.gif'">
                    <img name=next src="button_next.gif" border=0 alt="Next page" />
                  </a>
    
    
                </td>
              </tr>
            </table>
          </div>
          <div id="mainbody">
  


                <p class="p_BodyText"><span class="f_BodyText">Below is a selection of example Shape Scripts.</span></p>
<p class="p_BodyText"><span class="f_BodyText">&nbsp;</span></p>
<div style="text-align: left; text-indent: 0px; padding: 0px 0px 0px 0px; margin: 0px 0px 0px 13px;"><table cellspacing="0" cellpadding="0" border="0" style="border: none; border-spacing:0px; border-collapse: collapse;">
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="426" bgcolor="#e3e6ed" style="width:426px; height:12px; background-color:#e3e6ed; border: solid 1px #000000;"><p class="p_Tableheader"><span class="f_Tableheader">Code</span></p>
</td>
<td valign="top" width="262" bgcolor="#e3e6ed" style="width:262px; height:12px; background-color:#e3e6ed; border: solid 1px #000000;"><p class="p_Tableheader"><span class="f_Tableheader">Result</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="426" style="width:426px; border: solid 1px #000000;"><p class="p_CodeExample"><span class="f_CodeExample" style="font-style: italic; color: #000080;">//BASIC&nbsp;SHAPES</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">shape&nbsp;main</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">{</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">setfillcolor(</span><span class="f_CodeExample" style="color: #000080;">255</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">);&nbsp;</span><span class="f_CodeExample" style="font-style: italic; color: #000080;">//&nbsp;(R,G,B)</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">rectangle(</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">90</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">30</span><span class="f_CodeExample" style="color: #000000;">);&nbsp;&nbsp;</span><span class="f_CodeExample" style="font-style: italic; color: #000080;">//&nbsp;(x1,y1,x2,y2)</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">&nbsp;</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">setfillcolor(</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">255</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">);&nbsp;</span><span class="f_CodeExample" style="font-style: italic; color: #000080;">//&nbsp;(R,G,B)</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">ellipse(</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">30</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">90</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">60</span><span class="f_CodeExample" style="color: #000000;">);&nbsp;&nbsp;</span><span class="f_CodeExample" style="font-style: italic; color: #000080;">//&nbsp;(x1,y1,x2,y2)</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">&nbsp;</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">setfillcolor(</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">255</span><span class="f_CodeExample" style="color: #000000;">);&nbsp;</span><span class="f_CodeExample" style="font-style: italic; color: #000080;">//&nbsp;(R,G,B)</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">rectangle(</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">60</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">90</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">90</span><span class="f_CodeExample" style="color: #000000;">);&nbsp;&nbsp;&nbsp;</span><span class="f_CodeExample" style="font-style: italic; color: #000080;">//&nbsp;(x1,y1,x2,y2)</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">}</span></p>
</td>
<td valign="top" width="262" style="width:262px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">&nbsp;</span></p>
<p class="p_Tabletext"><img src="shapescripts_example1.png" width="231" height="176" border="0" alt="ShapeScripts_Example1"></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="426" style="width:426px; border: solid 1px #000000;"><p class="p_CodeExample"><span class="f_CodeExample" style="font-style: italic; color: #000080;">//SINGLE&nbsp;CONDITIONAL&nbsp;SHAPE</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">shape&nbsp;main</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">{</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="font-weight: bold; color: #000000;">if</span><span class="f_CodeExample" style="color: #000000;">&nbsp;(HasTag(</span><span class="f_CodeExample" style="color: #000080;">&quot;Trigger&quot;</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">&quot;Link&quot;</span><span class="f_CodeExample" style="color: #000000;">))</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">{</span><span class="f_CodeExample" style="font-style: italic; color: #000080;">//&nbsp;Only&nbsp;draw&nbsp;if&nbsp;the&nbsp;object&nbsp;has&nbsp;a&nbsp;Tagged&nbsp;Value</span><br>
<span class="f_CodeExample" style="font-style: italic; color: #000080;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;Trigger=Link</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="font-style: italic; color: #000080;">//&nbsp;Set&nbsp;the&nbsp;fill&nbsp;color&nbsp;for&nbsp;the&nbsp;path</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">setfillcolor(</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">startpath();&nbsp;</span><span class="f_CodeExample" style="font-style: italic; color: #000080;">//&nbsp;Start&nbsp;to&nbsp;trace&nbsp;out&nbsp;a&nbsp;path</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">moveto(</span><span class="f_CodeExample" style="color: #000080;">23</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">40</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">lineto(</span><span class="f_CodeExample" style="color: #000080;">23</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">60</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">lineto(</span><span class="f_CodeExample" style="color: #000080;">50</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">60</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">lineto(</span><span class="f_CodeExample" style="color: #000080;">50</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">76</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">lineto(</span><span class="f_CodeExample" style="color: #000080;">76</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">50</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">lineto(</span><span class="f_CodeExample" style="color: #000080;">50</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">23</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">lineto(</span><span class="f_CodeExample" style="color: #000080;">50</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">40</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">endpath();&nbsp;&nbsp;</span><span class="f_CodeExample" style="font-style: italic; color: #000080;">//&nbsp;End&nbsp;tracing&nbsp;out&nbsp;a&nbsp;path</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="font-style: italic; color: #000080;">//&nbsp;Fill&nbsp;the&nbsp;traced&nbsp;path&nbsp;with&nbsp;the&nbsp;fill&nbsp;color</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">fillandstrokepath();</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="font-weight: bold; color: #000000;">return</span><span class="f_CodeExample" style="color: #000000;">;</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">}</span></p>
</td>
<td valign="top" width="262" style="width:262px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">&nbsp;</span></p>
<p class="p_Tabletext"><img src="shapescrips_example4.png" width="161" height="114" border="0" alt="ShapeScrips_Example4"></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="426" style="width:426px; border: solid 1px #000000;"><p class="p_CodeExample"><span class="f_CodeExample" style="font-style: italic; color: #000080;">//MULTI&nbsp;CONDITIONAL&nbsp;SHAPE</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">shape&nbsp;main</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">{</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">startpath();</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">ellipse(</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">100</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">100</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">endpath();</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">fillandstrokepath();</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">ellipse(</span><span class="f_CodeExample" style="color: #000080;">3</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">3</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">27</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">27</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">&nbsp;</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="font-weight: bold; color: #000000;">if</span><span class="f_CodeExample" style="color: #000000;">&nbsp;(HasTag(</span><span class="f_CodeExample" style="color: #000080;">&quot;Trigger&quot;</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">&quot;None&quot;</span><span class="f_CodeExample" style="color: #000000;">))</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">{</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="font-weight: bold; color: #000000;">return</span><span class="f_CodeExample" style="color: #000000;">;</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">&nbsp;</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="font-weight: bold; color: #000000;">if</span><span class="f_CodeExample" style="color: #000000;">&nbsp;(HasTag(</span><span class="f_CodeExample" style="color: #000080;">&quot;Trigger&quot;</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">&quot;Error&quot;</span><span class="f_CodeExample" style="color: #000000;">))</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">{</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">setfillcolor(</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">startpath();</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">moveto(</span><span class="f_CodeExample" style="color: #000080;">23</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">77</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">lineto(</span><span class="f_CodeExample" style="color: #000080;">37</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">40</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">lineto(</span><span class="f_CodeExample" style="color: #000080;">60</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">47</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">lineto(</span><span class="f_CodeExample" style="color: #000080;">77</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">23</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">lineto(</span><span class="f_CodeExample" style="color: #000080;">63</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">60</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">lineto(</span><span class="f_CodeExample" style="color: #000080;">40</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">53</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">lineto(</span><span class="f_CodeExample" style="color: #000080;">23</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">77</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">endpath();</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">fillandstrokepath();</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="font-weight: bold; color: #000000;">return</span><span class="f_CodeExample" style="color: #000000;">;</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">}</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="font-weight: bold; color: #000000;">if</span><span class="f_CodeExample" style="color: #000000;">&nbsp;(HasTag(</span><span class="f_CodeExample" style="color: #000080;">&quot;Trigger&quot;</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">&quot;Message&quot;</span><span class="f_CodeExample" style="color: #000000;">))</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">{</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">rectangle(</span><span class="f_CodeExample" style="color: #000080;">22</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">22</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">78</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">78</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">moveto(</span><span class="f_CodeExample" style="color: #000080;">22</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">22</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">lineto(</span><span class="f_CodeExample" style="color: #000080;">50</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">50</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">lineto(</span><span class="f_CodeExample" style="color: #000080;">78</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">22</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="font-weight: bold; color: #000000;">return</span><span class="f_CodeExample" style="color: #000000;">;</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">}</span></p>
</td>
<td valign="top" width="262" style="width:262px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">&nbsp;</span></p>
<p class="p_Tabletext"><img src="shapescrips_example6.png" width="243" height="157" border="0" alt="ShapeScrips_Example6"></p>
<p class="p_Tabletext"><span class="f_Tabletext">&nbsp;</span></p>
<p class="p_Tabletext"><img src="shapescrips_example7.png" width="217" height="163" border="0" alt="ShapeScrips_Example7"></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="426" style="width:426px; border: solid 1px #000000;"><p class="p_CodeExample"><span class="f_CodeExample" style="font-style: italic; color: #000080;">//SUB&nbsp;SHAPES</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">shape&nbsp;main</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">{</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">rectangle(</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">100</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">100</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;</p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">addsubshape(</span><span class="f_CodeExample" style="color: #000080;">&quot;red&quot;</span><span class="f_CodeExample" style="color: #000000;">,&nbsp;&nbsp;&nbsp;</span><span class="f_CodeExample" style="color: #000080;">10</span><span class="f_CodeExample" style="color: #000000;">,&nbsp;&nbsp;</span><span class="f_CodeExample" style="color: #000080;">20</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">addsubshape(</span><span class="f_CodeExample" style="color: #000080;">&quot;blue&quot;</span><span class="f_CodeExample" style="color: #000000;">,&nbsp;&nbsp;</span><span class="f_CodeExample" style="color: #000080;">30</span><span class="f_CodeExample" style="color: #000000;">,&nbsp;&nbsp;</span><span class="f_CodeExample" style="color: #000080;">40</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">addsubshape(</span><span class="f_CodeExample" style="color: #000080;">&quot;green&quot;</span><span class="f_CodeExample" style="color: #000000;">,&nbsp;</span><span class="f_CodeExample" style="color: #000080;">50</span><span class="f_CodeExample" style="color: #000000;">,&nbsp;&nbsp;</span><span class="f_CodeExample" style="color: #000080;">20</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">addsubshape(</span><span class="f_CodeExample" style="color: #000080;">&quot;red&quot;</span><span class="f_CodeExample" style="color: #000000;">,&nbsp;&nbsp;&nbsp;</span><span class="f_CodeExample" style="color: #000080;">100</span><span class="f_CodeExample" style="color: #000000;">,&nbsp;</span><span class="f_CodeExample" style="color: #000080;">20</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;</p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">shape&nbsp;red</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">{</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">setfillcolor(</span><span class="f_CodeExample" style="color: #000080;">200</span><span class="f_CodeExample" style="color: #000000;">,&nbsp;</span><span class="f_CodeExample" style="color: #000080;">50</span><span class="f_CodeExample" style="color: #000000;">,&nbsp;</span><span class="f_CodeExample" style="color: #000080;">100</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">rectangle(</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">100</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">100</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">}</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;</p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">shape&nbsp;blue</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">{</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">setfillcolor(</span><span class="f_CodeExample" style="color: #000080;">100</span><span class="f_CodeExample" style="color: #000000;">,&nbsp;</span><span class="f_CodeExample" style="color: #000080;">50</span><span class="f_CodeExample" style="color: #000000;">,&nbsp;</span><span class="f_CodeExample" style="color: #000080;">200</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">rectangle(</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">100</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">100</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">}</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;</p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">shape&nbsp;green</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">{</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">setfillcolor(</span><span class="f_CodeExample" style="color: #000080;">50</span><span class="f_CodeExample" style="color: #000000;">,&nbsp;</span><span class="f_CodeExample" style="color: #000080;">200</span><span class="f_CodeExample" style="color: #000000;">,&nbsp;</span><span class="f_CodeExample" style="color: #000080;">100</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">rectangle(</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">100</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">100</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">}</span></p>
</td>
<td valign="top" width="262" style="width:262px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">&nbsp;</span></p>
<p class="p_Tabletext"><img src="subshapes.png" width="208" height="134" border="0" alt="SubShapes"></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="426" style="width:426px; border: solid 1px #000000;"><p class="p_CodeExample"><span class="f_CodeExample" style="font-style: italic; color: #000080;">//Editable&nbsp;Field&nbsp;Shape</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">shape&nbsp;main</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">{</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">rectangle(</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">100</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">100</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">&nbsp;</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">addsubshape(</span><span class="f_CodeExample" style="color: #000080;">&quot;namecompartment&quot;</span><span class="f_CodeExample" style="color: #000000;">,&nbsp;</span><span class="f_CodeExample" style="color: #000080;">100</span><span class="f_CodeExample" style="color: #000000;">,&nbsp;</span><span class="f_CodeExample" style="color: #000080;">20</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">addsubshape(</span><span class="f_CodeExample" style="color: #000080;">&quot;stereotypecompartment&quot;</span><span class="f_CodeExample" style="color: #000000;">,&nbsp;</span><span class="f_CodeExample" style="color: #000080;">100</span><span class="f_CodeExample" style="color: #000000;">,&nbsp;4</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">&nbsp;</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">shape&nbsp;namecompartment</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">{</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">h_align&nbsp;=&nbsp;</span><span class="f_CodeExample" style="color: #000080;">&quot;center&quot;</span><span class="f_CodeExample" style="color: #000000;">;</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">editablefield&nbsp;=&nbsp;</span><span class="f_CodeExample" style="color: #000080;">&quot;name&quot;</span><span class="f_CodeExample" style="color: #000000;">;</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">&nbsp;</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">rectangle(</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">100</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">100</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">println(</span><span class="f_CodeExample" style="color: #000080;">&quot;name:&nbsp;</span><span class="f_CodeExample" style="color: #008000;">#name#&quot;</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000080;">}</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;</p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000080;">shape&nbsp;stereotypecompartment</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000080;">{</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000080;">h_align&nbsp;=&nbsp;&quot;center&quot;;</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000080;">editablefield&nbsp;=&nbsp;&quot;stereotype&quot;;</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">&nbsp;</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000080;">rectangle(0,0,100,100);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000080;">println(&quot;stereotype:&nbsp;</span><span class="f_CodeExample" style="color: #008000;">#stereotype#&quot;</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000080;">}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">}</span></p>
</td>
<td valign="top" width="262" style="width:262px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">&nbsp;</span></p>
<p class="p_Tabletext"><img src="editable%20field%20shape.png" width="191" height="126" border="0" alt="Editable Field Shape"></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="426" style="width:426px; border: solid 1px #000000;"><p class="p_CodeExample"><span class="f_CodeExample" style="font-style: italic; color: #000080;">//Return&nbsp;Statement&nbsp;Shape</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">shape&nbsp;main</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">{</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="font-weight: bold; color: #000000;">if</span><span class="f_CodeExample" style="color: #000000;">(hasTag(</span><span class="f_CodeExample" style="color: #000080;">&quot;alternatenotation&quot;</span><span class="f_CodeExample" style="color: #000000;">,&nbsp;</span><span class="f_CodeExample" style="color: #000080;">&quot;false&quot;</span><span class="f_CodeExample" style="color: #000000;">))</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">{</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="font-style: italic; color: #000080;">//draw&nbsp;ea's&nbsp;inbuild&nbsp;glyph</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">drawnativeshape();</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="font-style: italic; color: #000080;">//exit&nbsp;script&nbsp;with&nbsp;the&nbsp;return&nbsp;statement</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="font-weight: bold; color: #000000;">return</span><span class="f_CodeExample" style="color: #000000;">;</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">}</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;</p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="font-style: italic; color: #000080;">//alternate&nbsp;notation&nbsp;commands</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="font-style: italic; color: #000080;">//...</span></p>
<p class="p_CodeExample"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_CodeExample" style="color: #000000;">rectangle(</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">100</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">100</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">}</span></p>
</td>
<td valign="top" width="262" style="width:262px; border: solid 1px #000000;"><p class="p_Tabletext"><img src="returnstatement2.png" width="164" height="133" border="0" alt="ReturnStatement2"></p>
<p class="p_Tabletext"><img src="retrnstatement1.png" width="160" height="130" border="0" alt="RetrnStatement1"></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="426" style="width:426px; border: solid 1px #000000;"><p class="p_CodeExample"><span class="f_CodeExample" style="font-style: italic; color: #000080;">//Cloud&nbsp;Path&nbsp;Example&nbsp;Shape</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">shape&nbsp;main</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">{</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;StartCloudPath();</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;Rectangle(</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">0</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">100</span><span class="f_CodeExample" style="color: #000000;">,</span><span class="f_CodeExample" style="color: #000080;">100</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;EndPath();</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;FillAndStrokePath();</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">}</span></p>
</td>
<td valign="top" width="262" style="width:262px; border: solid 1px #000000;"><p class="p_Tabletext"><img src="cloudpathexample.png" width="153" height="143" border="0" alt="CloudPathExample"></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="426" style="width:426px; border: solid 1px #000000;"><p class="p_CodeExample"><span class="f_CodeExample" style="font-style: italic; color: #333399;">//&nbsp;Connector&nbsp;Example</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">shape&nbsp;main</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">{</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;draw&nbsp;a&nbsp;dashed&nbsp;line</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;noshadow=true;</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;setlinestyle(&quot;DASH&quot;);</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;moveto(0,0);</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lineto(100,0);</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">shape&nbsp;source</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">{</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;draw&nbsp;a&nbsp;circle&nbsp;at&nbsp;the&nbsp;source&nbsp;end</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rotatable&nbsp;=&nbsp;true;</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;startpath();</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ellipse(0,6,12,-6);</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;endpath();</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fillandstrokepath();</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">shape&nbsp;target</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">{</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;draw&nbsp;an&nbsp;arrowhead&nbsp;at&nbsp;the&nbsp;target&nbsp;end</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rotatable&nbsp;=&nbsp;true;</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;startpath();</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;moveto(0,0);</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lineto(16,6);</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lineto(16,-6);</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;endpath();</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fillandstrokepath();</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">}</span></p>
</td>
<td valign="top" width="262" style="width:262px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">&nbsp;</span></p>
<p class="p_Tabletext"><img src="newconnector.png" width="225" height="250" border="0" alt="NewConnector"></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="426" style="width:426px; border: solid 1px #000000;"><p class="p_CodeExample"><span class="f_CodeExample" style="font-style: italic; color: #333399;">//&nbsp;Double&nbsp;Line</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">shape&nbsp;main</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">{</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;noshadow=true;</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;moveto(0,-10);</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lineto(100,-10);</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;moveto(0,10);</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lineto(100,10);</span></p>
<p class="p_CodeExample"><span class="f_CodeExample">}</span></p>
</td>
<td valign="top" width="262" style="width:262px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">&nbsp;</span></p>
<p class="p_Tabletext"><span class="f_Tabletext"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <img src="doublelineconn.png" width="116" height="70" border="0" alt="DoubleLineConn"></span></p>
</td>
</tr>
</table>
</div>




            </div>
          </div>
        </div>



</div>


</body>
</html>
